package com.servlet.request; /**
 * @author wzm
 * @create 2023-06-21 9:29
 */

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/b")
public class RequestServlet04 extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        doPost(request,response);
    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        System.out.println("我是B窗口,接下来我来给你处理业务，给我看看小票");
        //可以获取携带的数据
        Object tag = request.getAttribute("tag");
        System.out.println("tag = " + tag);

    }
}
